<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>   
<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">  
<html>
  <head>
    <base href="<%=basePath%>">  
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<link rel="stylesheet" type="text/css" href="css/edittable.css"  ></link>
	<link rel="stylesheet" type="text/css" href="css/validate.css"  ></link> 
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript"  src="js/jquery-1.8.0.js"></script>
	<script>
		/*当时说这个页面可以不添加验证  */
		$(function(){
			$("input[type=submit]").click(function(){
				if(confirm("确认要提交吗")){
					$.ajax({
						url:"RoleServlet.do",
						type:"post",
						data:{roleName:$("#pwdconfirm").val(),des:$(".txtarea").val(),flag:"roleAdd"},
						success:function(data){
							$("#result_msg").html(data);
						}
					});
				}
			});
			
			$("input[type=reset]").click(function(){
				$("#pwdconfirm").val("");
				$(".txtarea").val("");
			});
		});
	</script>
  </head>
  
  <body>
 	 <div class ="div_title">
			<div class="div_titlename"> <img src="images/san_jiao.gif" ><span>用户角色添加</span></div>
			<div class="div_titleoper">
			</div>
	</div>
  	<table class="edit_table">
  		<tr>
  			<td  class="td_info">角色名称</td>
  			<td><input class="txtbox" id="pwdconfirm" /></td>
  		</tr>
  		<tr>
  			<td  class="td_info">角色描述</td>
  			<td><textarea rows="4" cols="27" name="note" class="txtarea"></textarea></td>
  		</tr>
  		<tr>
 			<td class="td_info"> </td>	
 			<td> 
	 			<input class="form_btn" type="submit" value="提交" /> 
	 			<input type="reset"  class="form_btn" value="重置" /> 	
	 			<label id="result_msg" class="result_msg"></label>
 			</td>
 		</tr>
  	</table>
  </body>
</html>